/*
 * Copyright (c) 2009. Silenus Consultoria, S.L.
 */
package es.silenus.detecta.dao;

import es.silenus.detecta.model.KnowledgeArea;

import java.util.List;
import java.util.Map;


/**
 * @author <a href="mailto:dgarcia@silenus-consultoria.es">Daniel Garc&iacute;a</a>
 * @since 01-abr-2009 11:27:26
 */
public interface KnowledgeAreaDAO extends ReadWriteDAO<KnowledgeArea, Integer> {
	/**
	 * Finds all areas an organization owns.
	 *
	 * @param organizationId the organization id.
	 *
	 * @return the list of areas.
	 */
	public List<KnowledgeArea> findByOrganization(int organizationId);

	/**
	 * Finds an area given its code and organization id.
	 *
	 * @param code the code.
	 * @param organizationId the organization id.
	 *
	 * @return the area.
	 */
	public KnowledgeArea findByCode(final String code, int organizationId);

	/**
	 * Retrieves the removal information of entities with the given keys.
	 *
	 * @param keys the keys.
	 *
	 * @return the information requested.
	 */
	public List<Map<String, Object>> getRemovalInformation(final Integer[] keys);

	/**
	 * Removes areas by keys.
	 *
	 * @param keys the keys.
	 */
	public void remove(final Integer[] keys);
}
